package com.qifei.xmlg_backend.service.impl;

import com.qifei.xmlg_backend.DTO.classes.ClassStudentCountVO;
import com.qifei.xmlg_backend.entity.Class;
import com.qifei.xmlg_backend.entity.Job;
import com.qifei.xmlg_backend.entity.JobCount;
import com.qifei.xmlg_backend.mapper.ClassMapper;
import com.qifei.xmlg_backend.service.IClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 班级表 服务实现类
 * </p>
 *
 * @author qifei
 * @since 2025-06-11
 */
@Service
@AllArgsConstructor
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Class> implements IClassService {

    private final ClassMapper classMapper;

    @Override
    public List<ClassStudentCountVO> getStudentCountByClassId() {
        return classMapper.getAllClassStudentCounts();
    }
}
